
#pragma once

#include <OgreNewt.h>


//! This inheritable class represents / contains the physics world.
//!
class PhysWorld
{

	OgreNewt::World * mPhysWorld;

	float mElapsed;
	float mUpdate;

public:

	//! Constructs the object itself. To actually use it, 
	//! CreatePhysicsWorld must be called.
	//!
	PhysWorld();

	//! Creates the OgreNewt physics world.
	//!
	void CreatePhysicsWorld();

	//! Destroys the OgreNewt physics World.
	//!
	void DestroyPhysicsWorld();

	//! Returns a pointer to the OgreNewt physics world.
	//!
	//! @return Pointer to the OgreNewt::World. Null if it has not yet been created. 
	OgreNewt::World * GetPhysWorld();

	//! Initializes the physics debugger.
	//!
	void InitializePhysicsDebugger(Ogre::SceneManager * mgr);

	//! Updates Physics World at most 10 times per sec
	//!
	void UpdatePhysicsWorld(Ogre::Real const & elapsedSinceLastFrame);

};